package com.wzx.dao.impl;

import com.wzx.dao.IPersonDao;
import com.wzx.domain.Person;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;
//@Repository 此类以后不用，将由Mybatis给我生成
@Deprecated //过时
public class PersonDaoImpl implements IPersonDao {
    @Override
    public List<Person> findAll() {
        System.out.println("findAll dao");
        List<Person>  list = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            Person p =   new Person("jack"+i,100.00);
            p.setId(i);
            list.add(p);
        }
        return list;
    }

    @Override
    public void save(Person person) {
        System.out.println("save dao");
    }
}
